package org.dtrd.modules.food.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.food.entity.po.DtrdExtEmsYwCookbooks;

/**
 * <p>
 * 菜谱
 * </p>
 *
 * @author QR
 * @since 2021-12-09
 */
@Getter
@Setter
@ApiModel(value = "菜谱详情")
public class CookbooksDetail {

    private Integer dataId;


    @ApiModelProperty("菜品名称")
    private String cookName;

    @ApiModelProperty("菜品热量")
    private Integer cookKcal;

    @ApiModelProperty("脂肪/克")
    private Float cookFat;

    @ApiModelProperty("蛋白质/克")
    private Float cookProtein;

    @ApiModelProperty("膳食纤维/克")
    private Float cookDf;

    @ApiModelProperty("碳水化合物/克")
    private Float cookCarbohydrate;

    @ApiModelProperty("胆固醇/毫克")
    private Float cookCholesterin;

    @ApiModelProperty("材料调料：例子：胡萝卜-5克|黄瓜-3克|盐-半勺")
    private String cookMaterial;

    @ApiModelProperty("做法")
    private String cookPractice;

    @ApiModelProperty("健康知识")
    private String cookHealth;

    @ApiModelProperty("菜品标签")
    private String cookTips;

    @ApiModelProperty("菜谱分类")
    private Integer cookCategoryid;

    @ApiModelProperty("菜谱URL")
    private String cookUrl;

    private String cookThumb;

    @ApiModelProperty("材料")
    private String cookFood;

    @ApiModelProperty("调料")
    private String cookSeason;

    @ApiModelProperty("常见类型（可多选）：1-早餐,2-午餐,3-晚餐")
    private String cookCommonType;

    public CookbooksDetail parseFromPo(DtrdExtEmsYwCookbooks po) {
        dataId = po.getDataId();
        cookName = po.getCookName();
        cookKcal = po.getCookKcal();
        cookFat = po.getCookFat();
        cookProtein = po.getCookProtein();
        cookDf = po.getCookDf();
        cookCarbohydrate = po.getCookCarbohydrate();
        cookCholesterin = po.getCookCholesterin();
        cookMaterial = po.getCookMaterial();
        cookPractice = po.getCookPractice();
        cookHealth = po.getCookHealth();
        cookTips = po.getCookTips();
        cookCategoryid = po.getCookCategoryid();
        cookUrl = po.getCookUrl();
        cookThumb = po.getCookThumb();
        cookFood = po.getCookFood();
        cookSeason = po.getCookSeason();
        cookCommonType = po.getCookCommonType();
        return this;
    }
}
